package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StOrderDetailMapper;
import com.ruoyi.system.domain.StOrderDetail;
import com.ruoyi.system.service.IStOrderDetailService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-08
 */
@Service
public class StOrderDetailServiceImpl implements IStOrderDetailService 
{
    @Autowired
    private StOrderDetailMapper stOrderDetailMapper;

    /**
     * 查询订单明细
     * 
     * @param id 订单明细主键
     * @return 订单明细
     */
    @Override
    public StOrderDetail selectStOrderDetailById(Long id)
    {
        return stOrderDetailMapper.selectStOrderDetailById(id);
    }

    /**
     * 查询订单明细列表
     * 
     * @param stOrderDetail 订单明细
     * @return 订单明细
     */
    @Override
    public List<StOrderDetail> selectStOrderDetailList(StOrderDetail stOrderDetail)
    {
        return stOrderDetailMapper.selectStOrderDetailList(stOrderDetail);
    }

    /**
     * 新增订单明细
     * 
     * @param stOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int insertStOrderDetail(StOrderDetail stOrderDetail)
    {
        return stOrderDetailMapper.insertStOrderDetail(stOrderDetail);
    }

    /**
     * 修改订单明细
     * 
     * @param stOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int updateStOrderDetail(StOrderDetail stOrderDetail)
    {
        return stOrderDetailMapper.updateStOrderDetail(stOrderDetail);
    }

    /**
     * 批量删除订单明细
     * 
     * @param ids 需要删除的订单明细主键
     * @return 结果
     */
    @Override
    public int deleteStOrderDetailByIds(Long[] ids)
    {
        return stOrderDetailMapper.deleteStOrderDetailByIds(ids);
    }

    /**
     * 删除订单明细信息
     * 
     * @param id 订单明细主键
     * @return 结果
     */
    @Override
    public int deleteStOrderDetailById(Long id)
    {
        return stOrderDetailMapper.deleteStOrderDetailById(id);
    }
}
